<template>
  <div class="demo">
    <h2>{{name}}</h2>
    <h2>{{address}}</h2>
    <button @click="show"></button>
  </div>
</template>

<script>
export default {
  name: "School",
  data() {
    return {
      name: "广州新华学院",
      address: "东莞",
    };
  },
  methods: {
    show() {
      alert(this.name);
    },
  },
};
</script>

<style>
.demo {
  background-color: antiquewhite;
}
</style>